﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Template.Core.Utils.Cookie
{
    /// <summary>
    /// 操纵cookie的工具类
    /// </summary>
    interface ICookieHelper
    {
        /// <summary>
        /// 添加cookie
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        void SetCookie(string key, string value);

        /// <summary>
        /// 添加cookie(加上了过期时间)
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <param name="expiresTime"></param>
        void SetCookie(string key, string value, int expiresTime);

        /// <summary>
        /// 获取cookie
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        string GetCookie(string key);

        /// <summary>
        /// 删除cookie
        /// </summary>
        /// <param name="key"></param>
        void DeleteCookie(string key);
    }
}
